package com.qf.czh.model;

import org.springframework.stereotype.Component;

@Component
public class RespBean {
    private Integer status;
    private String msg;
    private  Object o;

    public RespBean() {
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getO() {
        return o;
    }

    public void setO(Object o) {
        this.o = o;
    }

    public RespBean(Integer status, String msg, Object o) {
        this.status = status;
        this.msg = msg;
        this.o = o;
    }

    public static RespBean ok( String msg ){
        RespBean respBean = new RespBean(200 ,msg, null);
        return respBean;
    }

    public static RespBean error( String msg ){
        RespBean respBean = new RespBean(500 ,msg,null);
        return respBean;
    }

    public static RespBean ok( String msg,Object o  ){
        RespBean respBean = new RespBean(200 ,msg, o);
        return respBean;
    }

    public static RespBean errror(String msg , Object o  ){
        RespBean respBean = new RespBean(500 ,msg,o);
        return respBean;
    }
}
